package com.ioc.xmlFactoryBean;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class factoryBeanTest {

    public static void main(String[] args) {

        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("application-factoryBean.xml");
        factoryBean factoryBean = (com.ioc.xmlFactoryBean.factoryBean) applicationContext.getBean("factoryBean");
        System.out.println(factoryBean.toString());

        factoryBean factoryBean2 = (com.ioc.xmlFactoryBean.factoryBean) applicationContext.getBean("factoryBean2");
        System.out.println(factoryBean2.toString());
    }
}
